<template>
  <div class="home">
    <h1>首页</h1>
  </div>
</template>


<script>

import request from "@/utils/request";

export default {
  name: 'Home',
  components: {
  },
  data(){
    return{
      msg:""
    }
  },
  created() {
    this.load();
  },
  methods: {
    //加载数据方法
    load() {

      // 1 使用axios进行操作 这里的request在utils中定义 其中引入了Axios
      // 2 //在request.js中设置了baseURL
      request.get("/admin/page/pay", {
        params: {
          pageNum: this.pageNum,
          pageSize: this.pageSize,
          //productName: this.productName,
          // username: this.username,
        }
      }).then(res => {
        console.log(res)
        this.tableDate = res.data.list
        this.total = res.data.total
      })

    },
  }
}
</script>
